package com.zhuangjie.mvc.validator.annotate;

import com.zhuangjie.mvc.validator.handler.ValidTimeRangeStringValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = ValidTimeRangeStringValidator.class)
public @interface ValidTimeRangeString {
    String message() default "{com.yourdomain.validation.constraints.ValidStringPattern.message}";

    /**
     * 1,2,3 中的,分隔符号
     * @return
     */
    String delimiter();

    String rangeDelimiter() default "-";

    String timeInternalDelimiter() default ":";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
